All Questions
Tagged with executableshebang
19 questions
1vote
3answers
584views
Make STDIN executable with shebang
I have a program to list database files. It is called direkly from the shell like db filename to list the whole file, or like db 'filename :: conditions' to list only selected elements ... Another ...
8votes
2answers
1kviews
Equivalent of executing a file (with shebang line) by entering its path?
Say I have a file hello: #!/bin/sh echo "Hello World!" Provided the executable bit is set on that file, I can execute it by entering its path on the prompt: $ ./hello Hello World! Is ...
0votes
1answer
626views
Run python script without declare it interpreter
I have such a program to check methods of data from the command line: me at me in ~/Desktop/Coding/codes $ cat check_methods.py #! /usr/bin/env python from sys import argv methods = dir(eval(argv[1]))...
7votes
6answers
4kviews
Fastest way to determine if shebang is present
If I have a file with #!/usr/bin/env foobar what is the fastest/best way to determine if this file has a hashbang? I hear you can just read the first 2 bytes? How?
1vote
1answer
651views
Change the default executable for file with potentially missing shebang
I have a library - users are to create executable files, potentially with a hashbang to tell exec which executable to use. If they omit the hashbang, then I think most systems default to /bin/sh, I ...
3votes
2answers
2kviews
xslt shbang: Using xslt from the command line
I have (foolishly?) written a couple of moderately general-purpose xslt scripts. I'd quite like to turn these into executables that read an xml document from standard in or similar. The way you do ...
92votes
1answer
12kviews
Why does the following bash script delete itself?
If you create an executable file with the following contents, and run it, it will delete itself. How does this work? #!/bin/rm
1vote
3answers
3kviews
"No such file" with ksh, but script runs with ksh -x?
I'm trying to execute a shell script on OpenBSD 5.7/amd64. Its a test script used to test a FOSS project. (OpenBSD is one of our targets because it provides an ancient compiler out of the box). When ...
2votes
2answers
3kviews
Why does trying to run a python executable return ': No such file or directory' after transferring it to server via FTP? [duplicate]
I'm having an issue where when I transfer a Python file to my VPS via FTP and try to run it using ./foo.py I am returned with the error: : No such file or directory. The error seems to indicate that ...
2votes
0answers
540views
Why won't my python scripts run without the python command when moved from Windows to Linux? [duplicate]
I have some Python files that I wrote on my Windows PC and then sent over to a Linux machine using pscp. They work as intended on Windows, but when I try to execute them on the Linux machine, I always ...
12votes
1answer
67kviews
No such file or directory but I can see it!
I'm trying to run a python script, on a headless Raspberry PI using winSCP and get the following error message: Command '"./areadetect_movie_21.py"' failed with return code 127 and error message /usr/...
13votes
2answers
65kviews
Bash Script Permission denied & Bad Interpreter
I'm on a kali linux 64 bit. I have created a python script which takes 2 arguments to start. I don't want to type out every time the exact same paths or search in the history of the commands I used ...
4votes
0answers
448views
Shebang: History and Purpose [closed]
I have few questions about the magic number #!, the shebang. I read that it was introduced by Dennis Ritchie in the 70s as a way to see a script as an executable file. I don't understand, why it was ...
5votes
2answers
864views
run perl script with unknown perl location
I'm developing a perl script which expected to be downloaded by Mac users with a very small knowledge of shell, linux etc, let's say office managers and accountants. After the downloading the script ...
7votes
6answers
46kviews
Running python script from Linux Terminal
I have downloaded this script named, pyAES.py and put it in a folder name codes, inside a Desktop directory of my Linux, According to this example, http://brandon.sternefamily.net/2007/06/aes-...